import fetch from '@/utils/fetch'
// 用户登录
export function login(username, password) {
  return fetch({
    url: 'login',
    method: 'post',
    data: { username, password }
  })
}
// 用户注册
export function register(email, password) {
  return fetch({
    url: 'customer/register',
    method: 'post',
    data: {
      email,
      password
    }
  })
}// 用户注销
export function logout() {
  return fetch({
    url: 'customer/logout',
    method: 'get'
  })
}
